<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/index.css">
    <script src="js/vue.js"></script>
    <script src="js/elementui.js"></script>
    <script src="js/axios.js"></script>
    <script src="js/common.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="app">
        <template>
            <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="uname" label="用户名" width="180">
                </el-table-column>
                <el-table-column prop="upwd" label="密码" width="180">
                </el-table-column>
            </el-table>
        </template>
    </div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {
            tableData: [],
        },
        methods: {
            initTableData() {
               
                let that = this
                axios.get(API + "boot/selectAll").then(function (res) {
                    console.log(res.data.data.userList)
                    that.tableData = res.data.data.userList
                }).catch(err => {
                    console.log(err)
                })
            }
        },mounted() {
            this.initTableData();
        }
    })
</script>

</html>